
import FetchHelper from "../helper/fetch-helper";

export default class JcyjApi {
    static async jcdList(params) {
        const resp = await FetchHelper.getJson(`/admin-api/ybyj/jcd/list`, {
            //xzqhbm: window.userAreaCode,
            ...params
        })
        return resp;
    }
    //雨情详情
    static async YqDetail_datafindby(params) {
        const resp = await FetchHelper.getJson(`/admin-api/ybyj/yqjc/list`, params)
        return resp;

    }
    //河道详情
    static async hedao_datafindby(params) {
        const resp = await FetchHelper.getJson(`/admin-api/ybyj/hdjc/list`, params)
        return resp;
    }
    //水库详情
    static async sksq_findby(params) {
        const resp = await FetchHelper.getJson(`/admin-api/ybyj/skjc/list`, params)
        return resp;
    }
    //根据隐患类别查询级别颜色
    static async yhlb_find(yhlb) {
        const resp = await FetchHelper.getJson(`/admin-api/ybyj/yjsj/jbysByYhlb`, {
            yhlb: yhlb
        });
        return resp;

    }
    //获取区县最新数据-降雨量
    static async map_color_jyl() {
        const resp = await FetchHelper.getJson(`/admin-api/ybyj/rysdsc/latest/data`, {
            type: "降雨量"
        });
        return resp;

    }
    //天气产品内容列表
    static async TqList(params) {
        const resp = await FetchHelper.getJson(`/admin-api/ybyj/tqcpnr/list`, params)
        return resp;
    }
    static async hp_findby() {
        return {
            data: [{
                title: '石坝乡镇危岩',
                content: '2.55'
            },
            {
                title: '石坝乡镇危岩',
                content: '2.55'
            },
            {
                title: '石坝乡镇危岩',
                content: '2.55'
            }]
        }
    }

    //地震评估
    static async dzpg_findby() {
        return {
            data: [{
                xh: '1',
                dzqy: '习家坝',
                zj: '3',
                zysd: '16',
                cz: ''
            },
            {
                xh: '2',
                dzqy: '邓家崖',
                zj: '3',
                zysd: '16',
                cz: ''
            },
            {
                xh: '3',
                dzqy: '腾家岩',
                zj: '3',
                zysd: '16',
                cz: ''
            },]
        }
    }
    //形变详情
    static async xbxq_findby(params) {
        const resp = await FetchHelper.getJson(`/admin-api/ybyj/dizhiData/list`, params)
        return resp;
    }
    //深林监测点
    static async sl_jcd() {
        return {
            data: [
                {
                    zdm: '翠屏区',
                },
                {
                    zdm: '叙州区',
                },
                {
                    zdm: '江安县',
                }, {
                    zdm: '长宁县',
                }, {
                    zdm: '双胜村'
                }

            ]
        }

    }
    //林区卡口
    static async lq_jcd() {
        return {
            data: [
                {
                    zdm: '宜宾市翠屏区高发路2号附2号807号',
                },
                {
                    zdm: '宜宾市翠屏区高发路2号附2号808',
                },
                {
                    zdm: '四川宜宾市珙县',
                }, {
                    zdm: '四川宜宾市高县',
                }

            ]
        }

    }
    //预警信息
    static async yujinmsg() {
        return {
            results: [{
                name: '筠连县',
                num: '10'
            },
            {
                name: '大坝村',
                num: '10'
            },
            {
                name: '燕子村',
                num: '10'
            },
            {
                name: '双胜村',
                num: '10'
            },
            {
                name: '叙州区',
                num: '10'
            }]
        }
    }
    static async WyList() {
        return {
            data: [{
                zd: '习家坝'
            },
            {
                zd: '腾家岩',
            },
            {
                zd: '邓家崖'
            }, {
                zd: '叙州区'
            }
            ]
        }
    }
    //位移详情
    static async Wy_datafindby() {
        return {
            data: [{
                wyl: '2'
            }]
        }
    }
    static async XbList() {
        return {
            data: [{
                zd: '大坝村'
            },
            {
                zd: '燕子村',
            },
            {
                zd: '双胜村'
            },]
        }
    }
    //dz快速评估
    static async dzkupg_find(params) {
        const resp = FetchHelper.getJson(`/admin-api/ybyj/jcd/list`, params)
        return resp;
    }
    //速报
    static async sbao_detail(params) {
        const resp = FetchHelper.getJson(`/admin-api/ybyj/dizhenData/list`, params)
        return resp;
    }
    //高空瞭望
    static async gkDetail_findby(params) {
        const resp = FetchHelper.getJson(`/admin-api/ybyj/gklwtjcData/list`, params)
        return resp;
    }
    //林区
    static async lqDetail_findby(params) {
        const resp = FetchHelper.getJson(`/admin-api/ybyj/lqkkjcData/list`, params)
        return resp;
    }


    static async dizaiList() {
        return {
            data: [{
                zd: '大坝村',
                zhwx: 'I级',
                fzcs: '',

            },
            {
                zd: '燕子村',
                zhwx: 'II级',
                fzcs: '',
            },
            {
                zd: '双胜村',
                zhwx: 'III级',
                fzcs: '',
            },
            ]
        }
    }

    //地震检测中的影响分析
    static async Yxfx_findby(params) {
        // const resp = await FetchHelper.getJson(`/admin-api/ybyj/jcd/list`, params)
        // return resp;
        return {
            data: [{
                mc: '区县',
                ts: '(3条)'
            }, {
                mc: '乡镇',
                ts: '(10条)'
            }, {
                mc: '房屋',
                ts: '(5条)'
            }, {
                mc: '人口',
                ts: '(8条)'
            }]
        }
    }

    //水位图
    static async suiwe() {
        return {
            data: [
                {
                    "timePeriod": "2006 Q3",
                    "value": 1
                },
                {
                    "timePeriod": "2006 Q4",
                    "value": 1.08
                },
                {
                    "timePeriod": "2007 Q1",
                    "value": 1.17
                },
                {
                    "timePeriod": "2007 Q2",
                    "value": 1.26
                },
                {
                    "timePeriod": "2007 Q3",
                    "value": 1.34
                },
                {
                    "timePeriod": "2007 Q4",
                    "value": 1.41
                },
                {
                    "timePeriod": "2008 Q1",
                    "value": 1.52
                }
            ]
        }
    }

    static async yjmsgs() {
        const resp = FetchHelper.getJson(`/admin-api/ybyj/yjsjb/list`, {
            pageNum: 1,
            pageSize: 5,
            isfb: 0,
            orderByColumn: 'createTime'
        })
        return resp;
    }
    static async warningList(type, page = 1, pageSize = 10) {
        const resp = FetchHelper.getJson(`/admin-api/ybyj/yjsjb/list`, {
            yhlb: type,
            orderByColumn: 'createTime',
            pageSize,
            pageNum: page
        })
        return resp;
    }
    //数据管理模块使用
    static async yjList(parms) {
        const resp = FetchHelper.getJson(`/admin-api/ybyj/yjsjb/list`, {
            ...parms,
            // pageNum: 1,
            // pageSize: 10,
        })
        return resp;

    }

    static async YjccglLookDynamicApi(parms) {
        const resp = FetchHelper.getJson(`${process.env.PUBLIC_URL}/datas/预警信息管理查看.json`)
        return resp;
    }

    //修改预警数据_参数需要给全
    static async Revise_yjsjb(parms) {
        const resp = FetchHelper.putJson(`/admin-api/ybyj/yjsjb`, { ...parms })
        return resp;
    }
}